# Contributor: Luca Weiss <luca@lucaweiss.eu>
# Maintainer: Luca Weiss <luca@lucaweiss.eu>
pkgname=ayatana-indicator-printers
pkgver=23.10.1
pkgrel=1
pkgdesc="Ayatana Indicator Printers Applet"
url="https://github.com/AyatanaIndicators/ayatana-indicator-printers"
arch="all"
license="GPL-3.0-only"
makedepends="
	cmake
	cmake-extras
	cups-dev
	glib-dev
	gtk+3.0-dev
	intltool
	libayatana-common-dev
	libayatana-indicator-dev
	libdbusmenu-gtk3-dev
	mate-common
	samurai
	"
subpackages="$pkgname-lang"
source="https://github.com/AyatanaIndicators/ayatana-indicator-printers/archive/$pkgver/ayatana-indicator-printers-$pkgver.tar.gz"
options="!check" # no clear way to run tests

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		$CMAKE_CROSSOPTS .
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
c6c6a428c6033627aec418def9f0ba8f68a981291cede511f6602c6291d430903751ea1c6296001ada83069f651143ffabb721e7e9ec496de615feb48651bab5  ayatana-indicator-printers-23.10.1.tar.gz
"
